import java.applet.Applet;
import java.awt.*;
//import java.awt.event.*;
import java.awt.Choice;
import java.awt.Scrollbar;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class DataInjectionAWTdesctop {
		
	/**
	 * add Menu
	 * 
	 */
	
	 public static void main(String[] args) {
		   
		  Gui screen = new Gui("AWT simple app");
		        screen.setSize(700,400);
		        screen.setVisible(true);  

		 }
		 
		 

		}
	class Gui extends Frame{
		 
		 public Gui(String s){  
		  
		  super(s);   
		                
		        addWindowListener(new WindowAdapter() {
		          public void windowClosing(WindowEvent e) {
		            System.exit(0);
		          }
		        });
		        
		setLayout(new FlowLayout());
	
		 

		//size of main window
		setSize(400,600);
		
		Panel EditboxPanel = new Panel();
		Panel panel2 = new Panel();
		Panel panel3 = new Panel();
		Panel panel4 = new Panel();
		Panel panel5list = new Panel();
		Panel panel6menu = new Panel();
		
		
		//buttonssss
		Button diButton1 = new Button("new button 1");
		
		Checkbox diChBox1 = new Checkbox("CheckBox 1"); 
		Checkbox diChBox2 = new Checkbox();
		
		TextField diTextField = new TextField(10);
		
		Label TextFieldLabel = new Label("TextField1");
		Label ComboBoxLabel = new Label("ComboBox 1");
		Label ComboBoxLabel2 = new Label("ComboBox 2");
		/*
          * To create a AWT choice control or a combobox, use
          * Choice()
          * constructor of AWT Choice class.
          */
        
         Choice language = new Choice();
         Choice language2 = new Choice();
        
         /*
          * To add items in a choice control or a combobox, use
          * void add(String item)
          * method of AWT Choice class.
          */
         language.add("Java");
         language.add("C++");
         language.add("VB");
         language.add("Perl");
        
         language2.add("Java");
         language2.add("C++");
         language2.add("VB");
         language2.add("Perl");
         
         
         //add choice or combobox
         EditboxPanel.add(TextFieldLabel);
         EditboxPanel.add(diTextField);
       
       //For future
      //   for(int i=0; i<3;i++){
      //  	 EditboxPanel.add(new Button("button"+i));
      //   }
           
         diChBox2.setLabel("CheckBox 2");
         
         //Radiobutton group
         CheckboxGroup group = new CheckboxGroup();
         panel4.add(new Checkbox("One", group, true));
         panel4.add(new Checkbox("Two", group, false));
         panel4.add(new Checkbox("Three", group, false));
         panel4.add(new Checkbox("Four", group, false));
         
         List lst = new List(4, false);
         lst.add("Mercury");
         lst.add("Venus");
         lst.add("Earth");
         lst.add("JavaSoft");
         lst.add("Mars");
         lst.add("Jupiter");
         lst.add("Saturn");
         lst.add("Uranus");
         lst.add("Neptune");
         lst.add("Pluto");  
         

         panel2.add(diChBox1);
         panel2.add(diChBox2);
         EditboxPanel.add(diButton1);
         panel3.add(ComboBoxLabel);
         panel3.add(language);
         panel3.add(ComboBoxLabel2);
         panel3.add(language2);
         panel5list.add(lst);
         

         
         add(EditboxPanel, java.awt.BorderLayout.CENTER);
         add(panel2, java.awt.BorderLayout.CENTER);
         add(panel3, java.awt.BorderLayout.CENTER);
         add(panel4, java.awt.BorderLayout.CENTER);
         add(panel5list, java.awt.BorderLayout.CENTER);
         
         Scrollbar redSlider = new Scrollbar(Scrollbar.HORIZONTAL,0,11,0,400);
         panel6menu.add(redSlider);
         
         add(panel6menu,java.awt.BorderLayout.CENTER);
         
         setVisible(true);

	
	}

		 

        
        
 }

    


        

	

